package com.example.group2_pro.controller;

import com.example.group2_pro.entity.Books;
import com.example.group2_pro.service.BooksService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/books")
public class BooksController {
    @Resource
    private BooksService booksService;
    @RequestMapping("/findAll")
    public List<Books>findAll(){
    return booksService.findAll();
    }
}
